﻿@model NFine.Domain.Entity.Biz.UserOrderEntity
@{
    ViewBag.Title = "修改订单";
    Layout = "~/Views/Shared/_Form.cshtml";
}

<script type="text/javascript">
    function submitForm()
    {
        var totalmoney = parseFloat($("#F_TotalMoney").val());
        var productmoney = parseFloat($("#F_ProductPrice").val());
        totalmoney = isNaN(totalmoney) ? 0 : totalmoney;
        productmoney = isNaN(productmoney) ? 0 : productmoney;
        if (totalmoney == 0 || productmoney == 0) {
            $.modalAlert('订单金额填写错误或为0！', "error");
        }
        else {
            $.submitForm({
                url: "/ProductManage/Order/UpdateMoney",
                param: {'orderId':'@Model.F_Id','moeny1':totalmoney,'moeny2':productmoney},
                success: function () {
                    $.currentWindow().$("#gridList").trigger("reloadGrid");
                }
            });
        }
        
    }
</script>

<div style="padding: 20px;">
    <table class="form">
        <tr>
            <th class="formTitle">订单号：</th>
            <td class="formValue" style="">@Model.F_OrderCode </td>
            <th class="formTitle">下单时间：</th>
            <td class="formValue" style="">@Model.F_OrderTime </td>
        </tr>
        <tr>
            <th class="formTitle">商品总额：</th>
            <td class="formValue">
                <input type="number" name="F_TotalMoney" id="F_TotalMoney" value="@Model.F_TotalMoney" />
            </td>
            <th class="formTitle">支付金额：</th>
            <td class="formValue">
                <input type="number" name="F_ProductPrice"  id="F_ProductPrice" value="@Model.F_ProductPrice" />
            </td>
        </tr>
        <tr>
            <td colspan="4" style="text-align:center;padding-top:20px;">
                <a id="btn_finish" class="btn btn-default" onclick="submitForm()">完成</a>
            </td>
        </tr>
    </table>
</div>